import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        name: 'Layout',
        component: () => import('../views/Layout.vue')
    },
    {
        path: '/vxe-table',
        name: 'VxeTable',
        component: () => import('../views/VxeTable.vue')
    },
    {
        path: '/lucky-sheet',
        name: 'Luckysheet',
        component: () => import('../views/Luckysheet.vue')
    },
    {
        path: '/v-table',
        name: 'VTable',
        component: () => import('../views/VTable.vue'),
        children: [
            {
                path: 'basic',
                name: 'Basic',
                component: () => import('../views/VTable/VTableBasic.vue'),
            },
            {
                path: 'tree',
                name: 'Tree',
                component: () => import('../views/VTable/VTableTree.vue'),
            },
            {
                path: 'perspective',
                name: 'Perspective',
                component: () => import('../views/VTable/VTablePerspective.vue'),
            },
            {
                path: 'tree-perspective',
                name: 'TreePerspective',
                component: () => import('../views/VTable/VTableTreePerspective.vue'),
            },
            {
                path: 'pie-perspective',
                name: 'PiePerspective',
                component: () => import('../views/VTable/VTablePiePerspective.vue'),
            },
            {
                path: 'cell',
                name: 'Cell',
                component: () => import('../views/VTable/VTableCell.vue'),
            },
            {
                path: 'frozen',
                name: 'Frozen',
                component: () => import('../views/VTable/VTableFrozen.vue'),
            },
            {
                path: 'sort',
                name: 'Sort',
                component: () => import('../views/VTable/VTableSort.vue'),
            },
            {
                path: 'merge-cell',
                name: 'MergeCell',
                component: () => import('../views/VTable/VTableMergeCell.vue'),
            },
            {
                path: 'checkbox',
                name: 'Checkbox',
                component: () => import('../views/VTable/VTableCheckbox.vue'),
            },
        ],
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;